
<extend name="Public/layout"/>
<block name="head">
<link rel="stylesheet" href="__PUBLIC__css/pupil.css">
<script src="__PUBLIC__js/circle.js"></script>
<link rel="stylesheet" href="__PUBLIC__css/baishi.css">
<style type="text/css">
.footer{
    display: none;
}
</style>

</block>

    <block name="main">
        <div class="container">
          <div class="m-title">
            <h4>亲爱的8号金融街用户，选择师父让您的理财道路不再踩雷。还可以领取师父的红包哦~</h4>
          </div>
          <div class="m-con">
            <ul id="content">
              <foreach name="recom" item="v">
                <li>
                  <div class="con-top clearfix">
                    <img src="{$v.user.url_img}">
                    <div class="top-item">
                      <h4>{:msubstr($v[user][nickname],0,8)}导师</h4><img src="__PUBLIC__images/ad-star.png" height="32" width="32"> 
                      <p>徒弟<span>{$v.fans}</span></p>
                    </div>
                    <a href="javascript:">
                      <p <notempty name="Think.session.user.id"> onclick="master('{$v.recommend_id}','{$v.user.nickname}','{$v.user.id}','{$v.user.nickname}')"<else/>onclick="isnologin()"</notempty>>拜师</p>
                    </a>
                  </div>
                  <div class="con-detail">
                    <p class="year">网贷投资<span><if condition="$v[year]">{$v.year}<else/>-</if>年</span></p>
                    <p class="boom">踩雷次数<span><if condition="$v[pit_num]">{$v.pit_num}<else/>-</if>雷</span></p>
                    <p class="plat">投资平台<span><if condition="$v[platform_num]">{$v.platform_num}<else/>-</if>家</span></p>
                  </div>
                  <notempty name='v.plat'>
                  <div class="m-circle">
                    <p>师父圈子：{$v.plat.0}<notempty name='v.plat.1'>,{$v.plat.1}</notempty></p>
                  </div>
                  </notempty>

                   <notempty name='v.factions'>
                  <div class="m-matial">
                    <p>{$v.factions.factions}：{$v.factions.describe}</p>
                  </div>
                  </notempty>
                <notempty name='v.skill.0'>
                  <div class="m-skill">
                    <h4>师门技能：
                      <notempty name='v.skill.0'><p class="peizhi">{$v.skill.0}</p></notempty>
                      <notempty name='v.skill.1'><p class="exercise">{$v.skill.1}</p></notempty>
                    </h4>
                  </div>
                </notempty>
                </li>
              </foreach>
            </ul>
          </div>
        </div>
        <div class="btn clearfix">
          <a class="think" style="width: 100%" href="/Home/Circle/circle_list">
            <p>暂时不拜师</p>
          </a>
         <!--  <a class="platform" <if condition="$_GET['plat_id'] gt 0"> href="/Home/Circle/circle_info/id/{$_GET['plat_id']}"<else/>href="/Home/Circle/circle_list"</if>>
            <p>查看平台圈子</p>
          </a> -->
        </div>
         <div class="loading clearfix">
        <span class="loading-left"></span>
        <p>加载中</p>
        <span class="loading-right"></span>
      </div>
      <div class="base-line clearfix">
        <span class="base-left"></span>
        <p>我是有底线的</p>
        <span class="base-right"></span>
      </div>
    <div class="baishitie">
  
</div>
<div class="suc-mon">
  
</div>
   
    </block>

<block name="js">
    <script type="text/javascript">

      function isnologin(){
        layer.open({
                    content: '请先登录！'
                    , skin: 'msg'
                    , time: 1
                    , end: function () {
                        location.href = "/Home/User/login?callback=/Home/User/master"
                    }
                });
      }

        var p=1;
        var status=1;
       $(window).scroll(function() {
            if(status){
               if($(document).scrollTop()==$(document).height()-$(window).height()){
                    $('.loading').css('display','block');
                    $('.base-line').css('display','none');
                      get_more(p)
                      p = p+1;
                }
            }
             
               
      });

      function get_more(p){
          var plat_id = "{$_GET['plat_id']}"
          $.post('/Home/User/master',{
            plat_id:plat_id,
            p:p
          },function(res){
            if(res.content){
              
                $('#content').append(res.content)
            }else{
                  $('.loading').css('display','none');
                  $('.base-line').css('display','block');
                  status=0;
            
          }
        })
    }

    </script>
</block>